Aspects of the present invention relate generally to the field of video processing, and more specifically, to managing multiple coders for a single video stream.
In video coding systems, an encoder may code a source video sequence into a coded representation that has a smaller bit rate than does the source video and thereby achieve data compression. Using predictive coding techniques, some portions of a video stream may be coded independently (intra-coded I-frames) and some other portions may be coded with reference to other portions (inter-coded frames, e.g., P-frames or B-frames). For example, P-frames may be coded with reference to a single previously coded frame and B-frames may be coded with reference to a pair of previously coded frames. Previously coded frames, also known as reference frames, may be temporarily stored by the encoder for future use in inter-frame coding. A reference frame cache may store frame data that may represent sources of prediction for later-received frames input to the video coding system. However, due to constraints in buffer sizes, a limited number of reference frames can be stored in the buffer.
The resulting compressed data (bitstream) may be transmitted to a decoder via a channel. To recover the video data, the bitstream may be decompressed at the decoder by inverting the coding processes performed by the encoder, yielding a received decoded video sequence.
If multiple encoders are provided, each of the encoders may utilize the same coding standard (e.g., H.264) but provide different capabilities or codecs. For example, a first encoder may be fast or operate with low power, but produce only moderate quality images, whereas a second encoder may produce better quality images but require significantly more power, produce coded video slower, or utilize significantly more bandwidth to transmit coded video data.
Conventionally, switching between encoders means beginning the coding process anew with a fresh encoder and transmitting an IDR to the decoder, refreshing the decoder and clearing the reference picture cache. Then reference frames are not available and predictive coding will not immediately be available. The first frame encoded at the second encoder and transmitted to the decoder will be an I-frame and possibly used as the first reference frame for a subsequent sequence of frames. Because I-frames are coded without reference to other frames, the I-frame takes longer to create and more bandwidth to transmit. This creates a delay in transmitting newly coded video data from a second encoder and eliminates some of the benefit of predictive coding.
Conventional video coding systems often operate in processing environments in which the resources available for coding or decoding operations vary dynamically. Modern communication networks provide variable bandwidth channels that connect an encoder to a decoder. Further, processing resources available at an encoder or a decoder may be constrained by hardware limitations or power consumption objectives that limit the complexity of analytical operations that can be performed for coding or decoding operations. When sufficient resources are unavailable, video coding systems may wait until they are available in order to maintain the coding rate or quality, causing an undesirable delay. However, real-time video coding systems may not have the ability to pause coding operations until system resources are available.
Accordingly, there is a need in the art to more efficiently switch between encoders.